package com.ywq.app.dao.impl;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;

import com.ywq.app.dao.UserDao;
import com.ywq.app.domain.User;

public class UserDaoImpl extends SqlSessionDaoSupport implements UserDao{
	
	@Override
	public List<User> findAll() throws Exception {
		try {
			return getSqlSession().selectList(
					"com.ywq.app.persistence.UserMapper.findAll");
		} catch (Exception e) {
			if (logger.isErrorEnabled()) {
				logger.error("Query User List failure.", e);
			}
			throw new Exception(e);
		}
	}
}
